package com.wangzhixuan.commons.utils;

import java.io.Serializable;

/**
 * 授权用户信息
 */
public class Principal implements Serializable {

	private static final long serialVersionUID = 1L;

	private String userId; // 编号
	private String accountNum; // 登录名
	private String mobile;
	private boolean rememberMe;

	// private Map<String, Object> cacheMap;

	public Principal(String userId,String accountNum,String mobile, boolean rememberMe) {
		this.userId = userId;
		this.accountNum = accountNum;
		this.mobile = mobile;
		this.rememberMe = rememberMe;
	}

	public String getUserId() {
		return userId;
	}

	public String getAccountNum() {
		return accountNum;
	}

	public String getMobile() {
		return mobile;
	}

	public boolean isRememberMe() {
		return rememberMe;
	}

	/**
	 * 获取SESSIONID
	 */
	public String getSessionid() {
		try {
			return null;
		} catch (Exception e) {
			return "";
		}
	}

	@Override
	public String toString() {
		return userId;
	}

}